package com.cennac.ccandroidtools;

import javax.swing.*;
import java.awt.*;

/**
 * Created by Cennac on 16/2/22.
 */
public class RawprogramForm {
    public static void main(String args[]) throws Exception {
        RawprogramFrame rawprogramFrame = new RawprogramFrame();
        rawprogramFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);//一定要设置关闭
//        rawprogramFrame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); // 点击 X 时不关闭

//居中显示
        int left = (rawprogramFrame.getToolkit().getScreenSize().width - rawprogramFrame.getSize().width) / 2;
        int top = (rawprogramFrame.getToolkit().getScreenSize().height - rawprogramFrame.getSize().height) / 2;

        rawprogramFrame.setLocation(left, top);


//        rawprogramFrame.setResizable(false); // 不能改变大小
        rawprogramFrame.setVisible(true);
    }
}
